﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace MessageCollection
{
    class Program
    {
        static void Main(string[] args)
        {
            MessageCollectionClass myCollection = new MessageCollectionClass();
            myCollection.AddToList(new MessageParameters(1, 1, "say"));
            myCollection.AddToList(new MessageParameters(2, 2, "hello"));
            myCollection.AddToList(new MessageParameters(3, 4, "to"));
            myCollection.AddToList(new MessageParameters(4, 5, "everyone"));

            //Console.WriteLine("id" + " " + "message");
            foreach (MessageParameters mc in myCollection)
            {
                Console.WriteLine(mc.id + "  " + mc.message);
            }
            Console.ReadLine();
        }
    }
}
